package com.hwl.demo9.service.impl;

import com.hwl.demo9.entity.Product;
import com.hwl.demo9.service.Builder;

/**
 * @author sentry
 * @since 2023-03-19
 */
public class ConcreteBuilder2 extends Builder {

    private final Product product = new Product();

    @Override
    public void buildPartA() {
        product.add("部件X");
    }

    @Override
    public void buildPartB() {
        product.add("部件Y");
    }

    @Override
    public Product getResult() {
        return product;
    }
}
